const { defineConfig } = require('@vue/cli-service')
const path = require('path');
module.exports =   {
  devServer: {
    port: 9999, // 强制指定8080端口
    proxy: {
      '/view': {
        target: 'http://127.0.0.1:8888',
        changeOrigin: true,
        pathRewrite: {
          '^/view': '/view'
        }
      }
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src')
      }
    }
  },

  chainWebpack: config => {
    config.resolve.alias
      .set('@', path.resolve(__dirname, 'src'));
  }
};
